home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Xm
/
SgDynaMenu.z
/
SgDynaMenu
Wrap
Text File
|
1998-10-30
|
16KB
|
265 lines
SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX))))
NNNNAAAAMMMMEEEE
SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu - The DynaMenu widget class
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<SSSSggggmmmm////DDDDyyyynnnnaaaaMMMMeeeennnnuuuu....hhhh>>>>
VVVVEEEERRRRSSSSIIIIOOOONNNN
This page documents the version of Sgm that accompanies
Motif 2.1.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The DynaMenu widget is packaged popup menu widget. The
DynaMenu supports dynamic changing of menu entries. Pressing
mouse button 1 on the DynaMenu pops up its menu. The
DynaMenu looks like a PushButton, but cannot be pushed-in.
Like a PushButton, it can accept either a label string or a
pixmap. Currently, however, you must have access to the
private instance record to set the string or pixmap.
CCCCllllaaaasssssssseeeessss
DynaMenu inherits behavior and resources from CCCCoooorrrreeee,
CCCCoooommmmppppoooossssiiiitttteeee, CCCCoooonnnnssssttttrrrraaaaiiiinnnntttt, and XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr.
The class pointer is ssssggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuuWWWWiiiiddddggggeeeettttCCCCllllaaaassssssss.
The class name is SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu.
NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss
The following table defines a set of widget resources used
by the programmer to specify data. The programmer can also
set the resource values for the inherited classes to set
attributes for this widget. To reference a resource by name
or by class in a .Xdefaults file, remove the SSSSggggNNNN or SSSSggggCCCC
prefix and use the remaining letters. To specify one of the
defined values for a resource in a .Xdefaults file, remove
the SSSSgggg prefix and use the remaining letters (in either
lowercase or uppercase, but include any underscores between
words). The codes in the access column indicate if the
given resource can be set at creation time (C), set by using
XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss (S), retrieved by using XXXXttttGGGGeeeettttVVVVaaaalllluuuueeeessss (G), or is
not applicable (N/A).
SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
__________________________________________________________________________
SgNdynaPushCallback XmCCallback XtCallbackList NULL C
SgNhistoryListItems XmCItems XmStringTable NULL CSG
SgNhistoryListItemCount XmCItemCount int 0 CSG
SgNmaxHistoryCount XmCItemCount int 6 CG
Page 1 (printed 10/24/98)
SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX))))
SSSSggggNNNNhhhhiiiissssttttoooorrrryyyyLLLLiiiissssttttIIIItttteeeemmmmssss
The items in the history menu. These can be
initialized to some set of strings which are
useful to the user. If left empty, the pulldown
menu will be very small and have nothing in it.
The number of items in the list should always
match up with the number in
SSSSggggNNNNhhhhiiiissssttttoooorrrryyyyLLLLiiiissssttttIIIItttteeeemmmmCCCCoooouuuunnnntttt. The widget makes a copy
of the list items, so the programmer is
responsible for XmStringFree'ing the list provided
to widget in a SetValues.
SSSSggggNNNNhhhhiiiissssttttoooorrrryyyyLLLLiiiissssttttIIIItttteeeemmmmCCCCoooouuuunnnntttt
The number of items in the history list. This
number should be at most SSSSggggNNNNmmmmaaaaxxxxHHHHiiiissssttttoooorrrryyyyCCCCoooouuuunnnntttt. An
error may result if this number is set to
something different than the number of items in
the SSSSggggNNNNhhhhiiiissssttttoooorrrryyyyLLLLiiiissssttttIIIItttteeeemmmmssss or if it is greater than
SSSSggggNNNNmmmmaaaaxxxxHHHHiiiissssttttoooorrrryyyyCCCCoooouuuunnnntttt.
SSSSggggNNNNmmmmaaaaxxxxHHHHiiiissssttttoooorrrryyyyCCCCoooouuuunnnntttt
The maximum number of items in the history list.
This resource cannot be changed after widget
creation. It defaults to 6. If more than
SSSSggggNNNNmmmmaaaaxxxxHHHHiiiissssttttoooorrrryyyyCCCCoooouuuunnnntttt items are given to the list,
only the first SSSSggggNNNNmmmmaaaaxxxxHHHHiiiissssttttoooorrrryyyyCCCCoooouuuunnnntttt are kept. If an
item is added to a full list, the last item on the
list (the least recently used item) is dropped
out.
IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss
DynaMenu inherits behavior and resources from CCCCoooorrrreeee,
CCCCoooommmmppppoooossssiiiitttteeee, CCCCoooonnnnssssttttrrrraaaaiiiinnnntttt, and XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr.
XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
_________________________________________________________________________________________________
XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNforeground XmCForeground Pixel dynamic CSG
XmNhelpCallback XmCCallback XtCallbackList NULL C
XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
XmNinitialFocus XmCInitialFocus Widget dynamic CSG
XmNnavigationType XmCNavigationType XmNavigationType XmTAB_GROUP CSG
XmNshadowThickness XmCShadowThickness Dimension dynamic CSG
XmNstringDirection XmCStringDirection XmStringDirection dynamic CG
XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG
Page 2 (printed 10/24/98)
SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX))))
XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
XmNtraversalOn XmCTraversalOn Boolean True CSG
XmNunitType XmCUnitType unsigned char dynamic CSG
XmNuserData XmCUserData XtPointer NULL CSG
CCCCoooommmmppppoooossssiiiitttteeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
______________________________________________________________________
XmNchildren XmCReadOnly WidgetList NULL G
XmNinsertPosition XmCInsertPosition XtOrderProc NULL CSG
XmNnumChildren XmCReadOnly Cardinal 0 G
CCCCoooorrrreeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
______________________________________________________________________________________________________________
XmNaccelerators XmCAccelerators XtAccelerators dynamic N/A
XmNancestorSensitive XmCSensitive Boolean dynamic G
XmNbackground XmCBackground Pixel dynamic CSG
XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG
XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderWidth XmCBorderWidth Dimension 0 CSG
XmNcolormap XmCColormap Colormap dynamic CG
XmNdepth XmCDepth int dynamic CG
XmNdestroyCallback XmCCallback XtCallbackList NULL C
XmNheight XmCHeight Dimension dynamic CSG
XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C
XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
XmNscreen XmCScreen Screen * dynamic CG
XmNsensitive XmCSensitive Boolean True CSG
XmNtranslations XmCTranslations XtTranslations dynamic CSG
XmNwidth XmCWidth Dimension dynamic CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG
CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
The Callback structure is SgDynaMenuCallbackStruct. A
pointer to the following structure is passed to each
callback:
ttttyyyyppppeeeeddddeeeeffff ssssttttrrrruuuucccctttt
{{{{
iiiinnnntttt _r_e_a_s_o_n;;;;
XXXXEEEEvvvveeeennnntttt * _e_v_e_n_t;;;;
iiiinnnntttt _b_u_t_t_o_n__n_u_m_b_e_r;;;;
}}}} SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuuCCCCaaaallllllllbbbbaaaacccckkkkSSSSttttrrrruuuucccctttt;;;;
_r_e_a_s_o_n Indicates why the callback was invoked. For a push
on menu button, the reason will be SgCR_DYNA_PUSH.
_e_v_e_n_t Points to the XXXXEEEEvvvveeeennnntttt that triggered the callback
Page 3 (printed 10/24/98)
SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX))))
_b_u_t_t_o_n__n_u_m_b_e_r
Specifies the button which was pressed. Range is
from 0 to SSSSggggNNNNhhhhiiiissssttttoooorrrryyyyLLLLiiiissssttttIIIItttteeeemmmmssssCCCCoooouuuunnnntttt - 1.
RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
CCCCoooorrrreeee((((3333XXXX)))), SSSSggggCCCCrrrreeeeaaaatttteeeeDDDDyyyynnnnaaaaMMMMeeeennnnuuuu((((3333XXXX)))),
SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuuAAAAddddddddHHHHiiiissssttttoooorrrryyyyIIIItttteeeemmmm((((3333XXXX)))), SSSSggggDDDDyyyynnnnaaaaMMMMeeeennnnuuuuCCCClllleeeeaaaarrrrHHHHiiiissssttttoooorrrryyyy((((3333XXXX)))),
Page 4 (printed 10/24/98)